<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>路况信息</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/all_css.css" />
		<link rel="stylesheet" type="text/css" href="../css/weui/base.css" />
		<link rel="stylesheet" type="text/css" href="../lib/weui.css" />
		<link rel="stylesheet" type="text/css" href="../css/weui/jquery-weui.css" />
		<link rel="stylesheet" type="text/css" href="../iconfont/iconfont.css" />
		<style type="text/css">
			#free_main {
				max-width: 640px;
				min-width: 320px;
				margin: 0px auto;
			}
			
			.app_head_left {
				float: left;
				width: 30%;
				padding-top: 8px;
				padding-left: 6px;
			}
			
			.app_head_left a {
				color: #FFFFFF;
				font-size: 1.5em;
				font-weight: bold;
			}
			
			.app_head_mid {
				float: left;
				width: 40%;
				padding-top: 5px;
			}
			
			.app_head_right {
				float: right;
				height: 100%;
			}
			
			.app_head_right img {
				height: 38px;
				margin-top: 4px;
			}
			
			#app_head_title {
				text-align: center;
				color: #FFFFFF;
				font-size: 1.6em;
				font-family: "宋体";
				font-weight: bold;
			}
			
			#l-map {
				width: 100%;
			}
			/*----导航栏样式----*/
			
			.weui_bar_item_on {
				background-color: #FFFFFF !important;
				color: #0070B4 !important;
			}
			
			.weui_navbar_item {
				color: #FFFFFF;
				background-color: #CCCCCC;
			}
			
			.weui_navbar_item b {
				display: block;
				height: 2em;
				line-height: 2em;
				border-right: 1px solid #FFFFFF;
			}
			/* 搜索框区域样式 */
			
			.sec_line {
				width: 100%;
				background-color: #F5F5F5;
				padding: 7px 0px;
				border-bottom: 1px solid #DEDEDE;
			}
			
			#InputLine {
				margin-left: 2%;
				margin-right: 2%;
				margin-top: 3px;
				width: 96%;
				border: 1px solid #DEDEDE;
				border-radius: 7px;
				height: 44px;
				background-color: #FFFFFF;
				opacity: 0.92;
			}
			
			#freeway_suggestId {
				padding-left: 1em;
				width: 40%;
				height: 100%;
				border: none;
				float: left;
				outline: medium;
				color: #969696;
				font-size: 1.05em;
				font-weight: bold;
			}
			
			#freeEnd_suggestId {
				border-radius: 0;
				float: left;
				outline: none;
				border: medium;
				height: 100%;
				line-height: 43px;
				color: #B0B0B0;
				font-size: 1.05em;
				font-weight: bold;
				border-left: 1px solid #DEDEDE;
				border-right: 1px solid #DEDEDE;
				width: 48%;
				text-align: left;
				padding-left: 1.1em;
			}
			
			#searchBtn {
				display: block;
				float: right;
				width: 8.5%;
				padding-right: 10px;
				color: #666666;
				font-size: 2em;
				text-align: right;
				position: relative;
				left: -5px;
			}
			/*底部弹出框 头部样式*/
			
			.toolbar {
				height: 50px;
				background-color: #0070B4;
			}
			
			.toolbar-inner {}
			
			.title {
				color: #FFFFFF !important;
				/*font-family: "黑体";*/
				/*color: #fafafa;*/
				letter-spacing: 0;
				text-shadow: 0px 1px 0px #999, 0px 2px 0px #888, 0px 3px 0px #777, 0px 4px 0px #666, 0px 5px 0px #555;
			}
			
			.close-picker {
				color: #FFFFFF !important;
				font-weight: bold;
				margin-top: 3px;
				margin-right: 5px;
				font-size: 1.1em;
			}
			/*---遮罩层---*/
			
			.opacity {
				opacity: 0.7;
				filter: alpha(opacity=30);
				background-color: #000;
			}
			
			.mask {
				position: fixed;
				height: 100%;
				width: 100%;
				z-index: 99;
			}
			
			html,
			body {
				height: 100%;
			}
			/* ul li样式 */
			
			#freewayAll_Ul li {
				color: #666666;
				padding: 12px;
				box-shadow: 0px 5px 4px #DDDDDD;
				margin-top: 3px;
				width: 96%;
				margin-left: 2%;
				margin-right: 2%;
			}
			
			#freewayAll_Ul li p {
				height: 70px;
				line-height: 35px;
				border-bottom: 1px dashed #DEDEDE;
			}
			
			#freewayAll_Ul li p a {
				/*display: block;*/
				color: #1296DB;
				font-size: 16px;
			}
			
			#freewayAll_Ul li p span {
				display: block;
				width: 50%;
				float: left;
				font-size: 0.85em;
			}
			
			.huanhang {
				height: auto !important;
			}
			
			.freewayTitle {
				color: red;
				font-size: 1.15em;
			}
			
			.weui_tab {}
			/* 返回顶部按钮 */
			
			.returnTopBtn {
				position: fixed;
				right: 15px;
				bottom: 80px;
				width: 45px;
				height: 43px;
				border-radius: 8px;
				z-index: 9999;
				background-color: #CCCCCC;
				padding: 6px;
			}
			/*---遮罩层---*/
			
			.opacity {
				opacity: 0.6;
				filter: alpha(opacity=30);
				background-color: #000;
			}
			
			.mask {
				position: fixed;
				top: 0;
				height: 100%;
				width: 100%;
				z-index: 100;
			}
			
			html,
			body {
				height: 100%;
			}
			/*图层loading*/
			
			#tcLoading {
				position: absolute;
				top: 40%;
				left: 32%;
				width: 35%;
				height: 15%;
				font-size: 0.9em;
				background-image: url(../img/index/yjzPic.gif);
				background-repeat: no-repeat;
				background-size: 100% 100%;
				text-align: right;
				z-index: 100000;
				color: #FFFFFF;
			}
			
			.BMap_pop>img {
				display: none;
			}
			
			#noResult_freeway {
				width: 100%;
				text-align: center;
				margin-top: 180px;
				font-size: 1.8em;
				color: #666666;
				font-family: "宋体";
			}
			
			footer li {
				width: 50%;
				position: relative;
				top: -3px;
			}
			
			footer li:first-child img {
				width: 18%;
			}
			
			footer li:last-child img {
				width: 20%;
			}
			
			.weui_tab {
				padding-top: 70px;
			}
			
			.zanwuBs {
				position: fixed;
				top: 45%;
				width: 50%;
				left: 25%;
				text-align: center;
				color: #999999;
				font-weight: bold;
				font-size: 1.8em;
				box-shadow: 0px 0px 5px #999999;
			}
			
			#bs_shenhe {
				margin-top: -45px;
			}
			/*报送更新展示区域*/
			
			#myselfBsUl li {
				height: 190px;
				background-image: url(../img/bs/borderIMG_BS.jpg);
				background-size: 100% 100%;
				margin-bottom: 40px;
				width: 92%;
				margin-left: 4%;
				padding: 10px 10%;
			}
			
			#myselfBsUl {
				margin-top: 60px;
			}
			
			#myselfBsUl li p {
				height: 30px;
				line-height: 42px;
				white-space: nowrap;
				/* 不换行 */
				overflow: hidden;
				/* 内容超出宽度时隐藏超出部分的内容 */
				text-overflow: ellipsis;
				/* 当对象内文本溢出时显示省略标记(...) */
			}
			/*修改数据的扳手按钮*/
			
			.changeDataBtn {
				position: absolute;
				display: block;
				width: 40px;
				height: 40px;
				right: 16%;
				margin-top: 80px;
				border-radius: 40px;
				box-shadow: 1px 0px 5px #666666;
			}
			.changeDataBtn1 {
				position: absolute;
				display: block;
				width: 40px;
				height: 40px;
				right: 16%;
				margin-top: 20px;
				border-radius: 40px;
				box-shadow: 1px 0px 5px #666666;
				background-color: #128ECA;
				border: 3px solid #FFFFFF;
				text-align: center;
			}
			
			.changeDataBtn img,
			.changeDataBtn1 img {
				width: 100%;
			}
			
			.changeDataBtn1 img{
				width: 70%;
				margin-top: 13%;
			}
			
			/*头部温馨提示区域样式*/
			
			.head_wxts {
				color: #666666;
				margin: 1em;
				border-bottom: 1px dashed #808080;
				padding-bottom: 10px;
			}
			
			.head_wxts img {
				vertical-align: middle;
				width: 20px;
				position: relative;
				top: -3px;
			}
			/*目的地收藏的隐藏框*/
			
			#addCollectAlert {
				/*display: none;*/
				width: 80%;
				height: 380px;
				background-color: #F9F9F9;
				position: absolute;
				top: 18%;
				left: 10%;
				/*层级在遮罩层之上*/
				z-index: 100;
				border-radius: 15px;
			}
			
			#readAllMsg_Ul {
				text-align: left;
				padding-left: 1.3em;
				margin-top: 45px;
			}
			
			#readAllMsg_Ul p{
				color: #0070B4;
				margin-top: 2px;
			}
			
			#readAllMsg_Ul p span{
				color: #666666;
			}
			
			.sjxq_head {
				width: 80%;
				margin-left: 10%;
				color: #128ECA;
				/*border-bottom: 1px solid #128ECA;*/
				font-size: 1.25em;
				float: left;
				text-align: center;
				height: 35px;
				line-height: 48px;
			}
			
			.littleCloseBtn {
				display: block;
				float: right;
				width: 10%;
				height: 35px;
				line-height: 48px;
				font-size: 1.5em;
				float: right;
			}
			
			.sl_readIcon{
				position: absolute;
				margin-top: 1px;
				margin-left: 1px;
				width: 19px;
				height: 19px;
				border-radius: 19px;
				background-color: #128ECA;
				text-align: center;
			}
			
			.sl_readIcon img{
				width: 13px;
				margin-top: -2px;
			}
		</style>
		<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=MMh4H9m5FLBpizlht86GnGynuaM0oGKz"></script>
		<script type="text/javascript" src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"></script>
		<link href="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.css" rel="stylesheet" type="text/css" />
	</head>

	<body ontouchstart>
		<div class="mask opacity" id="opacityDiv_freeway" style="display: none;">
			<div id="tcLoading">
				努力加载中...
			</div>
		</div>
		<div class="mask opacity" id="readAllHc_opacity" style="display: none;"></div>
		<div id="free_main">
			<div class="index_head" id="firTitle">
				<div class="app_head_left">
					<a href="javascript:history.go(-1)" class="iconfont">&#xe6d4;</a>
				</div>
				<div class="app_head_mid">
					<p id="app_head_title">数据核查</p>
				</div>
				<div class="app_head_right">
					<!--<a href="freeway_tolls.html">
						<img src="img/freeway/moneyIcon.png" />
					</a>-->
				</div>
			</div>
			<!--<div id="allmap"></div>-->
			<div class="weui_tab">
				<p class="head_wxts">
					温馨提示：
					<br /> 查看此条信息详情请点击<a class="sl_readIcon"><img src="../img/bs/readAllMain_btnIcon.png"/></a>
					<br />通过此条审核请点击<img src="../img/hecha/ok_icon.png" />

				</p>
				<div id="bs_shenhe">
					<ul id="myselfBsUl">
						<!--js添加dom至此处-->
					</ul>
				</div>
				<!--<img src=""/>-->
			</div>
			<div id="addCollectAlert" style="display: none;">
				<p class="sjxq_head">数据详情</p>
				<a class="iconfont littleCloseBtn" onclick="littleCloseBtn()">&#xe6a6;</a>
				<ul id="readAllMsg_Ul">
					
				</ul>
			</div>
		</div>
		<div class="zanwuBs" style="display: none;">暂无信息</div>
		<img src="../img/index/returnTop2.png" style="display: none;" class="returnTopBtn" />
		<script src="../js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/md5.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/back_end.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/weui/jquery-weui.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			//			var dateNowStr = "";
			//			getNowDate();
			$(function() {
				var h = document.documentElement.clientHeight - 65;
				$("#l-map").height(h);
				getAllFreeway();

			});
			//
			//			//左上角返回按钮 点击事件
			//			function freeway_returnBtn() {
			//				if(!$("#chooseMap").hasClass("weui_bar_item_on")) {
			//					//当页面位于高速信息列表时
			//					window.location.href = "javascript:history.go(-1)";
			//				} else {
			//					//当页面位于地图时
			//					$("#chooseList").click();
			//				}
			//			}
			//
			//			//获取当前时间
			//			function getNowDate() {
			//				var date = new Date();
			//				var y = date.getFullYear();
			//				var m = date.getMonth() + 1;
			//				m = m >= 10 ? m : "0" + m;
			//				var d = date.getDate();
			//				d = d >= 10 ? d : "0" + d;
			//				var h = date.getHours();
			//				h = h >= 10 ? h : "0" + h;
			//				var min = date.getMinutes();
			//				min = min >= 10 ? min : "0" + min;
			//				var s = date.getSeconds();
			//				s = s >= 10 ? s : "0" + s;
			//				dateNowStr = y + '-' + m + '-' + d + ' ' + h + ':' + min + ':' + s;
			//				//				nyrStr = dateNowStr.split(" ")[0];
			//				//				console.log(dateNowStr);
			//			}
			//获取所有高速公路路况信息方法
			function getAllFreeway() {
				var userName = JSON.parse(localStorage.userJson)[0].username;
				var stdCode = JSON.parse(localStorage.userJson)[0].stdCode;
				$("#opacityDiv_freeway").show();
				$.ajax({
					type: "post",
					url: Url,
					data: {
						"type": "query_report_info",
						"STDCODE": stdCode,
						"USERNAME": userName
					},
					async: false,
					cache: false,
					dataType: "jsonp", //数据类型为jsonp
					jsonp: "callbackparam", //服务端用于接收callback调用的function名的参数  
					jsonpCallback: "jsonpCallback1",
					success: function(data) {
						//						console.log(data);
						$("#opacityDiv_freeway").hide();
						var d = data.DATA;
						var m = data.MDATA;
						if(isEncrypt(d, m)) {
							d = eval(d).reverse(); //倒序显示
							console.log(d);
							if(d.length == 0) {
								$(".zanwuBs").show();
							} else {
								$(".zanwuBs").hide();
								for(var i = 0; i < d.length; i++) {
									var j = d[i];
									var lxmc = j.COURSENAME; //路线名称
									var ldmc = j.STDNAME; //路段名称
									var zdwz = j.BLOCKINGPOSITION; //阻断位置
									var qdzh = j.STARTSTOPPILENO_X; //起点桩号
									var zdzh = j.STARTSTOPPILENO_Y; //终点桩号
									var fxsj = j.FINDTIME; //发现时间
									var yjhfsj = j.ESTIMATEDTIME; //预计恢复时间
									var zdyy = j.BLOCKINGREASON; //阻断原因
									var sjhfsj = j.ACTUALTIME; //实际恢复时间
									var czcs = j.DISPOSALMEASURES; //处置措施
									var xcqkms = j.FIELDDESCRIPTION; //现场情况描述
									var jd = j.LON; //经度
									var wd = j.LAT; //纬度
									var zdfx = j.BLOCKDIRECTION; //阻断方向
									var recid = j.RECID; //标识

									//需要展示在外部的内容
									//--------添加DOM----------
									var btn = $('<a data-id="' + recid + '" class="changeDataBtn1" onclick="readAllMsg(this)"><img src="../img/bs/readAllMain_btnIcon.png"/></a><a data-id="' + recid + '" class="changeDataBtn" onclick="checkBsData(this)"><img src="../img/hecha/ok_icon.png"/></a>'); //扳手按钮
									var p1 = $('<p>名称： ' + lxmc + '</p>');
									var p2 = $('<p>发现于 ' + fxsj + '</p>');
									var p3 = $('<p>处置措施： ' + czcs + '</p>');
									var p4 = $('<p>预计恢复 ' + yjhfsj + '</p>');
									var p5 = $('<p>现场描述： ' + xcqkms + '</p>');
									var li = $('<li data-lxmc="' + lxmc + '" data-ldmc="' + ldmc + '" data-zdwz="' + zdwz + '" data-qdzh="' + qdzh + '" data-zdzh="' + zdzh + '" data-fxsj="' + fxsj + '" data-yjhfsj="' + yjhfsj + '" data-zdyy="' + zdyy + '" data-sjhfsj="' + sjhfsj + '" data-czcs="' + czcs + '" data-xcqkms="' + xcqkms + '" data-jd="' + jd + '" data-wd="' + wd + '" data-zdfx="' + zdfx + '"></li>');
									$(li).append(btn, p1, p2, p3, p4, p5);
									$("#myselfBsUl").append(li);

									//--------不展示的数据--------

								}
							}

						} else {
							$("#opacityDiv_freeway").hide();
							errMD();
						}
					},
					error: function(data) {
						$.alert("连接超时，请稍后再试", "提示");
						$("#opacityDiv_freeway").hide();
					}
				});
			}

			//审核通过的方法
			function checkBsData(t) {
				$.confirm("是否审核通过此信息？", function() {
					//点击确认后的回调函数
					var Recid = $(t).attr("data-id"); //该条报送的recid
					//审核接口
					$.ajax({
						type: "post",
						url: Url,
						data: {
							"type": "add_report_info",
							"RECID": Recid,
							"SFSH": "true"
						},
						async: false,
						cache: false,
						dataType: "jsonp", //数据类型为jsonp
						jsonp: "callbackparam", //服务端用于接收callback调用的function名的参数  
						jsonpCallback: "jsonpCallback1",
						success: function(data) {
							console.log(data);
							$.alert("操作成功", "提示", function() {
								window.location.reload();
							});
						},
						error: function(data) {
							$.alert("连接超时，请稍后再试", "提示");
						}
					});
				}, function() {
					//点击取消后的回调函数
				});
			}

			//审核拒绝的方法
			function checkWrongBsData(t) {
				$.confirm("是否驳回通过此信息？", function() {
					//点击确认后的回调函数
					var Recid = $(t).attr("data-id"); //该条报送的recid
					//审核接口
					$.ajax({
						type: "post",
						url: Url,
						data: {
							"type": "add_report_info",
							"RECID": Recid,
							"SFSH": "false"
						},
						async: false,
						cache: false,
						dataType: "jsonp", //数据类型为jsonp
						jsonp: "callbackparam", //服务端用于接收callback调用的function名的参数  
						jsonpCallback: "jsonpCallback1",
						success: function(data) {
							console.log(data);
							$.alert("操作成功", "提示", function() {
								window.location.reload();
							});
						},
						error: function(data) {
							$.alert("连接超时，请稍后再试", "提示");
						}
					});
				}, function() {
					//点击取消后的回调函数
				});
			}

			//查看全部信息
			function readAllMsg(t) {
				var thisLi = $(t).parent();
				$("#readAllHc_opacity").show();
				$("#addCollectAlert").show(200);
				$("#readAllMsg_Ul").html("");
				//---------需要展示的内容---------
				var d1 = thisLi.attr("data-lxmc"); //路线名称
				var d2 = thisLi.attr("data-ldmc"); //路段名称
				var d3 = thisLi.attr("data-zdwz"); //阻断位置
				var d4 = thisLi.attr("data-qdzh"); //起点桩号
				var d5 = thisLi.attr("data-zdzh"); //终点桩号
				var d6 = thisLi.attr("data-fxsj"); //发现时间
				var d7 = thisLi.attr("data-yjhfsj"); //预计恢复时间
				var d8 = thisLi.attr("data-sjhfsj"); //实际恢复时间
				var d9 = thisLi.attr("data-zdyy"); //阻断原因
				var d10 = thisLi.attr("data-czcs"); //处置措施
				var d11 = thisLi.attr("data-xcqkms"); //现场情况描述
				var d12 = thisLi.attr("data-jd"); //经度
				var d13 = thisLi.attr("data-wd"); //纬度
				var d14 = thisLi.attr("data-zdfx"); //阻断方向

				//--------添加DOM----------
				var p1 = $('<p>路线名称：<span>' + d1 + '</span></p>');
				var p2 = $('<p>路段名称：<span>' + d2 + '</span></p>');
				var p3 = $('<p>阻断位置：<span>' + d3 + '</span></p>');
				var p4 = $('<p>起点桩号：<span>' + d4 + '</span></p>');
				var p5 = $('<p>终点桩号：<span>' + d5 + '</span></p>');
				var p6 = $('<p>发现时间：<span>' + d6 + '</span></p>');
				var p7 = $('<p>预计恢复时间：<span>' + d7 + '</span></p>');
				var p8 = $('<p>实际恢复时间：<span>' + d8 + '</span></p>');
				var p9 = $('<p>阻断原因：<span>' + d9 + '</span></p>');
				var p10 = $('<p>处置措施：<span>' + d10 + '</span></p>');
				var p11 = $('<p>现场情况描述：<span>' + d11 + '</span></p>');
				var p12 = $('<p>经纬度：<span>( ' + d12 + ', ' + d13 + ' )</span></p>');
				var p13 = $('<p>阻断方向：<span>' + d14 + '</span></p>');
				var li = $('<li></li>');
				$(li).append(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
				$("#readAllMsg_Ul").append(li);

				//--------不展示的数据--------

			}
			//点击阴影层 关闭查看全部页签弹框
			$("#readAllHc_opacity").click(function() {
				$("#readAllHc_opacity").hide();
				$("#addCollectAlert").hide(200);
			});

			//小窗口关闭按钮
			function littleCloseBtn() {
				$("#readAllHc_opacity").click();
			}
		</script>
	</body>

</html>